home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / PInterfaces / OCETemplates.p < prev    next >
Encoding:
Text File  |  1998-08-17  |  86.6 KB  |  1,909 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        OCETemplates.p
  3.  
  4.      Contains:    Apple Open Collaboration Environment Templates Interfaces.
  5.  
  6.      Version:    Technology:    AOCE Toolbox 1.02
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. }
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT OCETemplates;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __OCETEMPLATES__}
  27. {$SETC __OCETEMPLATES__ := 1}
  28.  
  29. {$I+}
  30. {$SETC OCETemplatesIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33. {$IFC UNDEFINED __MACTYPES__}
  34. {$I MacTypes.p}
  35. {$ENDC}
  36. {$IFC UNDEFINED __EVENTS__}
  37. {$I Events.p}
  38. {$ENDC}
  39.  
  40. {$IFC UNDEFINED __OCE__}
  41. {$I OCE.p}
  42. {$ENDC}
  43.  
  44. {$IFC UNDEFINED __OCESTANDARDMAIL__}
  45. {$I OCEStandardMail.p}
  46. {$ENDC}
  47.  
  48.  
  49. {$PUSH}
  50. {$ALIGN MAC68K}
  51. {$LibExport+}
  52.  
  53.  
  54. {***********************************************************************************************
  55.  ********************************* Template Resource Constants: *********************************
  56.  ***********************************************************************************************}
  57.  
  58. { Current versions of all the different template types: }
  59.  
  60. CONST
  61.     kDETAspectVersion            = -976;
  62.     kDETInfoPageVersion            = -976;
  63.     kDETKillerVersion            = -976;
  64.     kDETForwarderVersion        = -976;
  65.     kDETFileTypeVersion            = -976;
  66.  
  67. {    "Normal" separation for template IDs within the file (this is just a suggestion; you can use whatever
  68.     separation you like, so long as two separate templates don't have overlapping resources): }
  69.     kDETIDSep                    = 250;
  70.  
  71. { A few predefined base IDs (again, just suggestions): }
  72.     kDETFirstID                    = 1000;
  73.     kDETSecondID                = 1250;
  74.     kDETThirdID                    = 1500;
  75.     kDETFourthID                = 1750;
  76.     kDETFifthID                    = 2000;
  77.  
  78. {    Templates consist of a set of associated resources, at constant offsets from a "base ID" set by the
  79.     signature resource of the template. In the case of aspect templates, most of the resources in the
  80.     template are accessible from the template as property default values. The property number is the same
  81.     as the offset from the base ID of the resource. In describing the resources which make up templates,
  82.     we give the type, the offset, and a description. For aspect templates, the offset is also the property #. 
  83.     
  84.     All templates include the following resource fork resources:
  85.  
  86.      Type    Offset                        Description
  87.      ----    ------                        -----------
  88.     'rstr'    kDETTemplateName            Contains the name of the template
  89.  
  90. }
  91.     kDETTemplateName            = 0;
  92.  
  93. {    Aspects, info-pages, and forwarders include the following as well:
  94.  
  95.      Type    Offset                        Description
  96.      ----    ------                        -----------
  97.     'rstr'    kDETRecordType                Contains the type of record this applies to
  98.     'rstr'    kDETAttributeType            Contains the type of attribute this applies to
  99.     'detn'    kDETAttributeValueTag        Contains the tag of the attribute values this applies to
  100.  
  101. }
  102.     kDETRecordType                = 1;
  103.     kDETAttributeType            = 2;
  104.     kDETAttributeValueTag        = 3;
  105.  
  106.  
  107. { ************************************ Aspects }
  108. {    In the case of aspects, property numbers and resource id offsets are the same. Therefore, some of the following
  109.     defines are used for resource offsets, some are used for dynamically generated properties, and some are used for
  110.     both (i.e., properties which may be dynamically generated, but if they aren't, then they're taken from the
  111.     resource). Resource types are given in all cases below; even if there is no actual resource (for example in
  112.     the case of kDETAspectName), it indicates the type for the dynamically generated property. A resource type of
  113.     'rstr' corresponds to a property type of kDETPrTypeString; type 'detn' corresponds to kDETPrTypeNumber; and
  114.     'detb' corresponds to kDETPrTypeBinary.
  115.  
  116.      Type    Offset                        Description
  117.      ----    ------                        -----------
  118.     'deta'    0                            Identifies the type of resource
  119.     'detc'    kDETCode                    Is the code resource, if any is used
  120.     'ICN#'    kDETAspectMainBitmap
  121.     'icl8'    kDETAspectMainBitmap
  122.     'icl4'    kDETAspectMainBitmap
  123.     'ics#'    kDETAspectMainBitmap
  124.     'ics8'    kDETAspectMainBitmap
  125.     'ics4'    kDETAspectMainBitmap
  126.     'sicn'    kDETAspectMainBitmap        Is the icon suite to display for this item type (main aspect only)
  127.     'rstr'    kDETAspectName                Contains the name of the item (attribute main aspect only)
  128.     'rst#'    kDETAspectCategory            Contains the internal categories for the record type (main aspect only)
  129.     'rst#'    kDETAspectExternalCategory    Contains the external (user-visible) names which correspond to the categories in
  130.                                         kDETAspectCategory; if this resource is not present, external names are taken from
  131.                                         another template; if no other template provides an external name for a given internal
  132.                                         category, the internal name is used as the external name (main aspect only)
  133.     'rstr'    kDETAspectKind                Is the item kind to display (main aspect only)
  134.     'detn'    kDETAspectGender            Is the gender of this kind of object for internationalization (main aspect only)
  135.     'rstr'    kDETAspectWhatIs            Is the string for balloon help when item is in sublist (main aspect only)
  136.     'rstr'    kDETAspectAliasKind            Is the item kind to display for aliases to this type of item (main aspect only)
  137.     'detn'    kDETAspectAliasGender        Is the gender of an alias to this kind of object for internationalization (main aspect only)
  138.     'rstr'    kDETAspectAliasWhatIs        Is the string for balloon help when an alias to the item is in sublist (main aspect only)
  139.     'rst#'    kDETAspectBalloons            Is a list of strings for balloon help; for each item in an info-page, it's
  140.                                         property # times 2 is used as an index into this array; if the item is not editable,
  141.                                         then the property # times 2 plus 1 is used
  142.     'rstr'    kDETAspectNewMenuName        Is the string to be used for the user to select new item creation; for records, the
  143.                                         string is used as a menu entry in the Catalogs menu; for attributes, the string
  144.                                         is used in a selection dialog invoked by an "Add..." button
  145.     'rstr'    kDETAspectNewEntryName        Is the name to be used for new records (with a digit appended if not unique)
  146.     'detb'    kDETAspectNewValue            Is the value to use when creating a new attribute value; the first four bytes
  147.                                         is the tag; the rest is the attribute value contents
  148.     'detn'    kDETAspectSublistOpenOnNew    If true (non-zero), automatically open newly created entries (property can be set
  149.                                         from a code resource, or via a default value in a resource)
  150.     'dett'    kDETAspectLookup            Is the attribute-to-property translation table
  151.     'rstr'    kDETAspectDragInString        Is a string describing the action of dragging into this aspect (if any)
  152.     'rstr'    kDETAspectDragInVerb        Is a single, short word that's the verb of the action (like "add" or "drop"; if
  153.                                         there's any doubt, use "OK")
  154.     'rstr'    kDETAspectDragInSummary        Is a short phrase that describes the action, suitable to be included in a selection list
  155.     'rst#'    kDETAspectRecordDragIn        Is a list of type pairs; in each pair, the first is the type of a record which
  156.                                         can be dragged into this aspect, and the second is the attribute type to store
  157.                                         the reference in
  158.     'rst#'    kDETAspectRecordCatDragIn    Is a list of category/attribute type pairs; in each pair, the first is the
  159.                                         category of records which can be dragged in, and the second is the type of
  160.                                         attribute to place the alias in
  161.     'rst#'    kDETAspectAttrDragIn        Is a list of type triples; in each triple, the first is the record type which can be
  162.                                         dragged from (or "" for any), the second is the attribute type which can be dragged
  163.                                         in, and the third is the attribute type to store the new attribute in
  164.     'rst#'    kDETAspectDragOut            Is a list of attribute types which can be dragged out of this aspect (an 'rst#'
  165.                                         resource with no entries means nothing can be dragged out; no 'rst#' resource means
  166.                                         everything can be dragged out)
  167.     'detm'    kDETAspectViewMenu            Is a table to fill in the view menu from
  168.     'detp'    kDETAspectReverseSort        Is a table listing which properties to sort in reverse order
  169.     'detw'    kDETAspectInfoPageCustomWindow    Is a specification of a custom window size/placement & whether to use the
  170.                                             page-selector (main aspect only)
  171.     'detv'    kDETAspectInfoPageCustomWindow    Is a view list which is common to all info-pages (main aspect only)
  172. }
  173.     kDETAspectCode                = 4;
  174.     kDETAspectMainBitmap        = 5;
  175.     kDETAspectName                = 6;
  176.     kDETAspectCategory            = 7;
  177.     kDETAspectExternalCategory    = 8;
  178.     kDETAspectKind                = 9;
  179.     kDETAspectGender            = 10;
  180.     kDETAspectWhatIs            = 11;
  181.     kDETAspectAliasKind            = 12;
  182.     kDETAspectAliasGender        = 13;
  183.     kDETAspectAliasWhatIs        = 14;
  184.     kDETAspectBalloons            = 15;
  185.     kDETAspectNewMenuName        = 16;
  186.     kDETAspectNewEntryName        = 17;
  187.     kDETAspectNewValue            = 18;
  188.     kDETAspectSublistOpenOnNew    = 19;
  189.     kDETAspectLookup            = 20;
  190.     kDETAspectDragInString        = 21;
  191.     kDETAspectDragInVerb        = 22;
  192.     kDETAspectDragInSummary        = 23;
  193.     kDETAspectRecordDragIn        = 24;
  194.     kDETAspectRecordCatDragIn    = 25;
  195.     kDETAspectAttrDragIn        = 26;
  196.     kDETAspectAttrDragOut        = 27;
  197.     kDETAspectViewMenu            = 28;
  198.     kDETAspectReverseSort        = 29;
  199.     kDETAspectInfoPageCustomWindow = 30;
  200.  
  201. { Properties: }
  202.     kDETNoProperty                = -1;
  203.  
  204. { Each aspect has 250 attribute properties in this range: }
  205.     kDETFirstLocalProperty        = 0;
  206.     kDETLastLocalProperty        = 249;
  207.  
  208. { Developers should use property numbers starting at this point: }
  209.     kDETFirstDevProperty        = 40;
  210.  
  211. { The following range provides constant numeric properties for use in patterns and comparisons (constant n is
  212.   
  213.    given by kDETFirstConstantProperty+n): }
  214.     kDETFirstConstantProperty    = 250;
  215.     kDETLastConstantProperty    = 499;
  216.  
  217. { To convert a number into a constant property, add this: }
  218.     kDETConstantProperty        = 250;
  219.     kDETZeroProperty            = 250;
  220.     kDETOneProperty                = 251;
  221.     kDETFalseProperty            = 250;
  222.     kDETTrueProperty            = 251;
  223.  
  224. { The following apply to records, attributes, or aliases; they are the name and kind, as they appear in icon lists: }
  225.     kDETPrName                    = 3050;
  226.     kDETPrKind                    = 3051;
  227.  
  228. { Access mask properties: }
  229.     kDETDNodeAccessMask            = 25825;                        {  The DNode access mask  }
  230.     kDETRecordAccessMask        = 25826;                        {  The record access mask  }
  231.     kDETAttributeAccessMask        = 25827;                        {  The attribute access mask  }
  232.     kDETPrimaryMaskByBit        = 25828;                        {  A set of sixteen properties to access all bits of the primary mask  }
  233.  
  234. { See AOCE documentation for details definitions of each of these bits: }
  235.     kDETPrimarySeeMask            = 25828;
  236.     kDETPrimaryAddMask            = 25829;
  237.     kDETPrimaryDeleteMask        = 25830;
  238.     kDETPrimaryChangeMask        = 25831;
  239.     kDETPrimaryRenameMask        = 25832;
  240.     kDETPrimaryChangePrivsMask    = 25833;
  241.     kDETPrimaryTopMaskBit        = 25843;
  242.  
  243. { The following property is zero until we've completed the first catalog lookup; from then on it's 1 }
  244.     kDETPastFirstLookup            = 26550;
  245.  
  246. { The following property is the page number; issuing a property command with this property will flip info-pages }
  247.     kDETInfoPageNumber            = 27050;
  248.  
  249. { The value of the following properties contains the template number of the targeted aspect's template, and the
  250.    currently open info-page (if any). These values can be used with kDETAspectTemplate and kDETInfoPageTemplate
  251.    target selectors. }
  252.     kDETAspectTemplateNumber    = 26551;
  253.     kDETInfoPageTemplateNumber    = 26552;
  254.  
  255. { Properties for property commands to deal with sublist items: }
  256.     kDETOpenSelectedItems        = 26553;                        {  Open selected sublist items  }
  257.     kDETAddNewItem                = 26554;                        {  Add new sublist item  }
  258.     kDETRemoveSelectedItems        = 26555;                        {  Remove selected sublist items  }
  259.  
  260. { Property types are used to specify types of properties and conversions between types (zero and negative numbers
  261.    are reserved for Apple; developer code resources can use positive numbers): }
  262.     kDETPrTypeNumber            = -1;                            {  A number  }
  263.     kDETPrTypeString            = -2;                            {  A string  }
  264.     kDETPrTypeBinary            = -3;                            {  A binary block  }
  265.  
  266. { ************************************ Info-pages }
  267. { Info-pages include the following as well:
  268.  
  269.      Type    Offset                        Description
  270.      ----    ------                        -----------
  271.     'deti'    0                            Identifies the type of resource; see below for details on the contents
  272.     'rstr'    kDETInfoPageName            Is the name of the view to use in the page selection pop-up
  273.     'rstr'    kDETInfoPageMainViewAspect    Is the name of the aspect to use with the main page view
  274.     'rstr'    kDETInfoPageMenuName        Is the name of the catalogs menu ("Catalogs" if not present)
  275.     'detm'    kDETInfoPageMenuEntries        Are menu entries to go in the Catalogs menu
  276.  
  277. }
  278.     kDETInfoPageName            = 4;
  279.     kDETInfoPageMainViewAspect    = 5;
  280.     kDETInfoPageMenuName        = 6;
  281.     kDETInfoPageMenuEntries        = 7;
  282.  
  283.  
  284. { ************************************ Views 
  285.  
  286.    Flags: }
  287.     kDETNoFlags                    = 0;                            {  Main view (non-sublist) field enabled  }
  288.     kDETEnabled                    = $01;
  289.  
  290. { The following flags make sense for items in a sublist only }
  291.                                                                 {  Hilight view when entry is selected  }
  292.     kDETHilightIfSelected        = $01;
  293.  
  294. { The following flags make sense for text views only }
  295.     kDETNumericOnly                = $08;                            {  Only allow the user to enter digits  }
  296.     kDETMultiLine                = $10;                            {  Allow multiple lines in view  }
  297.     kDETDynamicSize                = $0200;                        {  Don't draw box around text until user clicks in it, then auto-size it  }
  298.                                                                 {  Don't allow the user to enter colons (convert ":"s to "-"s)  }
  299.     kDETAllowNoColons            = $0400;
  300.  
  301. { The following flags are used for pop-up menus only }
  302.                                                                 {  Automatically resize pop-up based on contents  }
  303.     kDETPopupDynamicSize        = $0100;
  304.  
  305. { The following flags are used for EditPicture views only }
  306.                                                                 {  Scale picture to view bounds rather than cropping  }
  307.     kDETScaleToView                = $0100;
  308.  
  309. {    Sizes for icons }
  310.     kDETLargeIcon                = 0;
  311.     kDETSmallIcon                = 1;
  312.     kDETMiniIcon                = 2;
  313.  
  314. { Stolen from TextEdit.h }
  315.     kDETLeft                    = 0;
  316.     kDETCenter                    = 1;
  317.     kDETRight                    = -1;
  318.     kDETForceLeft                = -2;
  319.  
  320. { Flags for use within Box view type attributes - these are distinct from the flags above }
  321.     kDETUnused                    = 0;
  322.     kDETBoxTakesContentClicks    = $01;
  323.     kDETBoxIsRounded            = $02;
  324.     kDETBoxIsGrayed                = $04;
  325.     kDETBoxIsInvisible            = $08;
  326.  
  327. { The common font info }
  328.     kDETApplicationFont            = 1;
  329.     kDETApplicationFontSize        = 9;
  330.     kDETAppFontLineHeight        = 12;
  331.     kDETSystemFont                = 0;
  332.     kDETSystemFontSize            = 12;
  333.     kDETSystemFontLineHeight    = 16;
  334.     kDETDefaultFont                = 1;
  335.     kDETDefaultFontSize            = 9;
  336.     kDETDefaultFontLineHeight    = 12;
  337.  
  338. {    These were taken from QuickDraw.h (where they're enums and therefore unusable in resource definitions): }
  339.     kDETNormal                    = 0;
  340.     kDETBold                    = 1;
  341.     kDETItalic                    = 2;
  342.     kDETUnderline                = 4;
  343.     kDETOutline                    = 8;
  344.     kDETShadow                    = $10;
  345.     kDETCondense                = $20;
  346.     kDETExtend                    = $40;
  347.  
  348.     kDETIconStyle                = -3;                            {  Normal text style for regular sublist entries, italic text style for aliases  }
  349.  
  350. { View menu: }
  351.     kDETChangeViewCommand        = 'view';                        {  Change the view; used especially in StaticCommandTextFromView sublist headers  }
  352.  
  353. { Info-page window sizes: }
  354. { Default record info-pages: }
  355.     kDETRecordInfoWindHeight    = 228;
  356.     kDETRecordInfoWindWidth        = 400;
  357.  
  358. { Default attribute info-pages: }
  359.     kDETAttributeInfoWindHeight    = 250;
  360.     kDETAttributeInfoWindWidth    = 230;
  361.  
  362. { Page identifying icon (for default info-page layout): }
  363.     kDETSubpageIconTop            = 8;
  364.     kDETSubpageIconLeft            = 8;
  365.     kDETSubpageIconBottom        = 40;
  366.     kDETSubpageIconRight        = 40;
  367.  
  368. { ************************************ Killers 
  369.  
  370.    Killers include the following as well:
  371.  
  372.      Type    Offset                        Description
  373.      ----    ------                        -----------
  374.     'detk'    0                            Identifies the type of resource; see below for details on the contents
  375.     'rst#'    kDETKillerName                Contains a list of template names to be killed
  376.  
  377. }
  378.     kDETKillerName                = 1;
  379.  
  380. { ************************************ Forwarders 
  381.  
  382.    Forwarders include the following as well:
  383.  
  384.      Type    Offset                        Description
  385.      ----    ------                        -----------
  386.     'detf'    0                            Identifies the type of resource; see below for details on the contents
  387.     'rst#'    kDETForwarderTemplateNames    Contains a list of names of templates to forward to
  388.  
  389. }
  390.     kDETForwarderTemplateNames    = 4;
  391.  
  392. {*********************************************************************************}
  393. {******************************** Code Resources: ********************************}
  394. {*********************************************************************************}
  395. { Target specification: }
  396.     kDETSelf                    = 0;                            {  The "current" item  }
  397.     kDETSelfOtherAspect            = 1;                            {  Another aspect of the current item  }
  398.     kDETParent                    = 2;                            {  The parent (i.e., the aspect we're in the sublist of, if any) of the current item  }
  399.     kDETSublistItem                = 3;                            {  The itemNumberth item in the sublist  }
  400.     kDETSelectedSublistItem        = 4;                            {  The itemNumberth selected item in the sublist  }
  401.     kDETDSSpec                    = 5;                            {  The item specified by the packed DSSpec  }
  402.     kDETAspectTemplate            = 6;                            {  A specific aspect template (number itemNumber)  }
  403.     kDETInfoPageTemplate        = 7;                            {  A specific info-page template (number itemNumber) * Force type to be short  }
  404.     kDETHighSelector            = $F000;
  405.  
  406.  
  407. TYPE
  408.     DETTargetSelector                    = LONGINT;
  409.     DETTargetSpecificationPtr = ^DETTargetSpecification;
  410.     DETTargetSpecification = RECORD
  411.         selector:                DETTargetSelector;                        {  Target selection method (see above)  }
  412.         aspectName:                RStringPtr;                                {  The name of the aspect (kDETSelfOtherAspect, kDETSublistItem, }
  413.                                                                         {    kDETSelectedSublistItem, kDETDSSpec); nil for main aspect or none;  }
  414.                                                                         {   always filled in for calls if there is an aspect, even if it's the main aspect  }
  415.         itemNumber:                LONGINT;                                {  Sublist index (kDETSublistItem & kDETSelectedSublistItem & kDETAspectTemplate); }
  416.                                                                         {    1-based indexing  }
  417.         dsSpec:                    PackedDSSpecPtr;                        {  DSSpec (kDETDSSpec only)  }
  418.     END;
  419.  
  420. { Code resource calls and call-backs both return an OSType:
  421.         kDETDidNotHandle (1)    = used by template to say "I didn't handle it" (for calls only)
  422.         noErr                    = function completed successfully
  423.         any error                = function failed, and here's why
  424. }
  425. { Call-back functions:
  426.  
  427.         reqFunction                            Action
  428.         -----------                            ------
  429.         kDETcmdBeep                            Call SysBeep; useful for testing that a code resource's calls/call-backs are working at all
  430.  
  431.         kDETcmdBusy                            Put up watch cursor and switch processes; user events elicit a beep
  432.  
  433.         kDETcmdChangeCallFors                Change call-fors mask
  434.  
  435.         kDETcmdGetCommandSelectionCount        Get the command selection count (for calls which have a command selection list)
  436.         kDETcmdGetCommandItemN                Get command selection item n (for calls which have a command selection list)
  437.  
  438.         kDETcmdOpenDSSpec                    PackedDSSpec open (can also be done via AppleEvents -- this is a short-cut)
  439.  
  440.         kDETcmdAboutToTalk                    About to talk to user: bring us to front, disable watch cursor, etc.
  441.  
  442.         kDETcmdUnloadTemplates                Flush templates
  443.  
  444.         kDETcmdTemplateCounts                Return number of aspect and info-page templates in system
  445.  
  446.         kDETcmdGetDSSpec                    Get the PackedDSSpec for this object
  447.  
  448.         kDETcmdSublistCount                    Return the count of the sublist items
  449.         kDETcmdSelectedSublistCount            Return the count of the selected sublist items
  450.  
  451.         kDETcmdRequestSync                    Request a sync-up of the aspect with the catalog
  452.  
  453.         kDETcmdBreakAttribute                Break an attribute -- apply all applicable patterns to an attribute to generate properties
  454.  
  455.         kDETcmdGetTemplateFSSpec            Get the FSSpec of the file containing the template
  456.  
  457.         kDETcmdGetOpenEdit                    Return the property of the view being edited (or kDETNoProperty if none)
  458.         kDETcmdCloseEdit                    Close the current edit
  459.  
  460.         kDETcmdGetPropertyType                Get a property type
  461.  
  462.         kDETcmdGetPropertyNumber            Get a property, number format
  463.         kDETcmdGetPropertyRString            Get a property, RString format
  464.         kDETcmdGetPropertyBinarySize        Get a property, binary, return size
  465.         kDETcmdGetPropertyBinary            Get a property, binary format
  466.  
  467.         kDETcmdGetPropertyChanged            Get a property changed flag
  468.         kDETcmdGetPropertyEditable            Get a property editable flag
  469.  
  470.         kDETcmdSetPropertyType                Set a property type
  471.  
  472.         kDETcmdSetPropertyNumber            Set a property, number format
  473.         kDETcmdSetPropertyRString            Set a property, RString format
  474.         kDETcmdSetPropertyBinary            Set a property, binary data & size
  475.  
  476.         kDETcmdSetPropertyChanged            Set a property changed flag
  477.         kDETcmdSetPropertyEditable            Set a property editable flag
  478.  
  479.         kDETcmdDirtyProperty                Dirty a property (notify other code resources of change)
  480.  
  481.         kDETcmdDoPropertyCommand            Issue a property command
  482.  
  483.         kDETcmdAddMenu                        Add to the end of a dynamic menu
  484.         kDETcmdRemoveMenu                    Remove a dynamic menu item
  485.         kDETcmdMenuItemRString                Get a dynamic menu item RString
  486.  
  487.         kDETcmdSaveProperty                    Force a save of a property -- apply all applicable patterns to write out the property
  488.  
  489.         kDETcmdGetCustomViewUserReference    Get custom view user reference (as given in .r file)
  490.         kDETcmdGetCustomViewBounds            Get custom view current bounds
  491.  
  492.         kDETcmdGetResource                    Get a resource from a template
  493. }
  494.  
  495.  
  496. CONST
  497.     kDETcmdSimpleCallback        = 0;
  498.     kDETcmdBeep                    = 1;
  499.     kDETcmdBusy                    = 2;
  500.     kDETcmdChangeCallFors        = 3;
  501.     kDETcmdGetCommandSelectionCount = 4;
  502.     kDETcmdGetCommandItemN        = 5;
  503.     kDETcmdOpenDSSpec            = 6;
  504.     kDETcmdAboutToTalk            = 7;
  505.     kDETcmdUnloadTemplates        = 8;
  506.     kDETcmdTemplateCounts        = 9;
  507.     kDETcmdTargetedCallback        = 1000;
  508.     kDETcmdGetDSSpec            = 1001;
  509.     kDETcmdSublistCount            = 1002;
  510.     kDETcmdSelectedSublistCount    = 1003;
  511.     kDETcmdRequestSync            = 1004;
  512.     kDETcmdBreakAttribute        = 1005;
  513.     kDETcmdGetTemplateFSSpec    = 1006;
  514.     kDETcmdGetOpenEdit            = 1007;
  515.     kDETcmdCloseEdit            = 1008;
  516.     kDETcmdPropertyCallback        = 2000;
  517.     kDETcmdGetPropertyType        = 2001;
  518.     kDETcmdGetPropertyNumber    = 2002;
  519.     kDETcmdGetPropertyRString    = 2003;
  520.     kDETcmdGetPropertyBinarySize = 2004;
  521.     kDETcmdGetPropertyBinary    = 2005;
  522.     kDETcmdGetPropertyChanged    = 2006;
  523.     kDETcmdGetPropertyEditable    = 2007;
  524.     kDETcmdSetPropertyType        = 2008;
  525.     kDETcmdSetPropertyNumber    = 2009;
  526.     kDETcmdSetPropertyRString    = 2010;
  527.     kDETcmdSetPropertyBinary    = 2011;
  528.     kDETcmdSetPropertyChanged    = 2012;
  529.     kDETcmdSetPropertyEditable    = 2013;
  530.     kDETcmdDirtyProperty        = 2014;
  531.     kDETcmdDoPropertyCommand    = 2015;
  532.     kDETcmdAddMenu                = 2016;
  533.     kDETcmdRemoveMenu            = 2017;
  534.     kDETcmdMenuItemRString        = 2018;
  535.     kDETcmdSaveProperty            = 2019;
  536.     kDETcmdGetCustomViewUserReference = 2020;
  537.     kDETcmdGetCustomViewBounds    = 2021;
  538.     kDETcmdGetResource            = 2022;                            {  Force type to be long  }
  539.     kDETcmdHighCallback            = $F0000000;
  540.  
  541.  
  542. TYPE
  543.     DETCallBackFunctions                = UInt32;
  544. { Call functions:
  545.  
  546.         reqFunction                        Action
  547.         -----------                        ------
  548.         kDETcmdInit                        Called once when template is first loaded (good time to allocate private data); returns call-for list
  549.         kDETcmdExit                        Called once when template is freed (good time to free private data)
  550.  
  551.         kDETcmdAttributeCreation        New sublist attribute creation about to occur; this gives the template a chance to modify
  552.                                         the value that's about to be created; sent to the template that will be used for
  553.                                         the main aspect of the new entry
  554.  
  555.         kDETcmdDynamicForwarders        Return a list of dynamically created forwarders
  556.  
  557.         kDETcmdInstanceInit                Called once when instance of template is started (good time to allocate private instance data)
  558.         kDETcmdInstanceExit                Called once when instance is ended (good time to free private instance data)
  559.  
  560.         kDETcmdIdle                        Called periodically during idle times
  561.  
  562.         kDETcmdViewListChanged            Called when the info-page view-list (list of enabled views) has changed
  563.  
  564.         kDETcmdValidateSave                Validate save: about to save info-page, return noErr (or kDETDidNotHandle) if it's OK to do so
  565.  
  566.         kDETcmdDropQuery                Drop query: return the appropriate operation for this drag; ask destination
  567.         kDETcmdDropMeQuery                Drop query: return the appropriate operation for this drag; ask dropee
  568.  
  569.         kDETcmdAttributeNew                Attribute value new (return kDETDidNotHandle to let normal new processing occur)
  570.         kDETcmdAttributeChange            Attribute value change (return kDETDidNotHandle to let normal change processing occur)
  571.         kDETcmdAttributeDelete            Attribute value delete (return kDETDidNotHandle to let normal deletion occur); sent to the
  572.                                         main aspect of the attribute that's about to be deleted
  573.         kDETcmdItemNew                    Target item (record or attribute) has just been created
  574.  
  575.         kDETcmdOpenSelf                    Self open (return noErr to prevent opening; return kDETDidNotHandle to allow it)
  576.  
  577.         kDETcmdDynamicResource            Return a dynamically created resource
  578.  
  579.         kDETcmdShouldSync                Check if the code resource wants to force a sync (update data from catalog)
  580.         kDETcmdDoSync                    Give code resource a chance to sync (read in and break all attributes)
  581.  
  582.         kDETcmdPropertyCommand            Command received in the property number range (usually means a button's been pushed)
  583.  
  584.         kDETcmdMaximumTextLength        Return maximum size for text form of property
  585.  
  586.         kDETcmdPropertyDirtied            Property dirtied, need to redraw
  587.  
  588.         kDETcmdPatternIn                Custom pattern element encountered on reading in an attribute
  589.         kDETcmdPatternOut                Custom pattern element encountered on writing out an attribute
  590.  
  591.         kDETcmdConvertToNumber            Convert from template-defined property type to number
  592.         kDETcmdConvertToRString            Convert from template-defined property type to RString
  593.         kDETcmdConvertFromNumber        Convert from number to template-defined property type
  594.         kDETcmdConvertFromRString        Convert from RString to template-defined property type
  595.  
  596.         kDETcmdCustomViewDraw            Custom view draw
  597.         kDETcmdCustomViewMouseDown        Custom view mouse down
  598.  
  599.         kDETcmdKeyPress                    Key press (used primarily to filter entry into EditText views)
  600.         kDETcmdPaste                    Paste (used primarily to filter entry into EditText views)
  601.  
  602.         kDETcmdCustomMenuSelected        Custom Catalogs menu selected
  603.         kDETcmdCustomMenuEnabled        Return whether custom Catalogs menu entry should be enabled
  604. }
  605.  
  606.  
  607. CONST
  608.     kDETcmdSimpleCall            = 0;
  609.     kDETcmdInit                    = 1;
  610.     kDETcmdExit                    = 2;
  611.     kDETcmdAttributeCreation    = 3;
  612.     kDETcmdDynamicForwarders    = 4;
  613.     kDETcmdTargetedCall            = 1000;
  614.     kDETcmdInstanceInit            = 1001;
  615.     kDETcmdInstanceExit            = 1002;
  616.     kDETcmdIdle                    = 1003;
  617.     kDETcmdViewListChanged        = 1004;
  618.     kDETcmdValidateSave            = 1005;
  619.     kDETcmdDropQuery            = 1006;
  620.     kDETcmdDropMeQuery            = 1007;
  621.     kDETcmdAttributeNew            = 1008;
  622.     kDETcmdAttributeChange        = 1009;
  623.     kDETcmdAttributeDelete        = 1010;
  624.     kDETcmdItemNew                = 1011;
  625.     kDETcmdOpenSelf                = 1012;
  626.     kDETcmdDynamicResource        = 1013;
  627.     kDETcmdShouldSync            = 1014;
  628.     kDETcmdDoSync                = 1015;
  629.     kDETcmdPropertyCall            = 2000;
  630.     kDETcmdPropertyCommand        = 2001;
  631.     kDETcmdMaximumTextLength    = 2002;
  632.     kDETcmdPropertyDirtied        = 2003;
  633.     kDETcmdPatternIn            = 2004;
  634.     kDETcmdPatternOut            = 2005;
  635.     kDETcmdConvertToNumber        = 2006;
  636.     kDETcmdConvertToRString        = 2007;
  637.     kDETcmdConvertFromNumber    = 2008;
  638.     kDETcmdConvertFromRString    = 2009;
  639.     kDETcmdCustomViewDraw        = 2010;
  640.     kDETcmdCustomViewMouseDown    = 2011;
  641.     kDETcmdKeyPress                = 2012;
  642.     kDETcmdPaste                = 2013;
  643.     kDETcmdCustomMenuSelected    = 2014;
  644.     kDETcmdCustomMenuEnabled    = 2015;
  645.     kDETcmdHighCall                = $F0000000;                    {  Force the type to be long  }
  646.  
  647.  
  648. TYPE
  649.     DETCallFunctions                    = UInt32;
  650. { Valid commandIDs for DETDropQueryBlock and DETDropMeQueryBlock (in addition to property numbers): }
  651.  
  652. CONST
  653.     kDETDoNothing                = 'xxx0';
  654.     kDETMove                    = 'move';
  655.     kDETDrag                    = 'drag';
  656.     kDETAlias                    = 'alis';
  657.  
  658.  
  659.  
  660. TYPE
  661.     DETProtoCallBackBlockPtr = ^DETProtoCallBackBlock;
  662.     DETProtoCallBackBlock = RECORD
  663.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  664.         target:                    DETTargetSpecification;                    {  The target for the request  }
  665.         property:                INTEGER;                                {  The property to apply the request to  }
  666.     END;
  667.  
  668.     DETBeepBlockPtr = ^DETBeepBlock;
  669.     DETBeepBlock = RECORD
  670.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  671.     END;
  672.  
  673.     DETBusyBlockPtr = ^DETBusyBlock;
  674.     DETBusyBlock = RECORD
  675.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  676.     END;
  677.  
  678.     DETChangeCallForsBlockPtr = ^DETChangeCallForsBlock;
  679.     DETChangeCallForsBlock = RECORD
  680.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  681.         target:                    DETTargetSpecification;                    {  The target for the request  }
  682.         newCallFors:            LONGINT;                                {   -> New call-for mask  }
  683.     END;
  684.  
  685.     DETGetCommandSelectionCountBlockPtr = ^DETGetCommandSelectionCountBlock;
  686.     DETGetCommandSelectionCountBlock = RECORD
  687.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  688.         count:                    LONGINT;                                {  <-  The number of items in the command selection list  }
  689.     END;
  690.  
  691.  
  692. CONST
  693.     kDETHFSType                    = 0;                            {  HFS item type  }
  694.     kDETDSType                    = 1;                            {  Catalog Service item type  }
  695.     kDETMailType                = 2;                            {  Mail (letter) item type  }
  696.     kDETMoverType                = 3;                            {  Sounds, fonts, etc., from inside a suitcase or system file  }
  697.     kDETLastItemType            = $F0000000;                    {  Force it to be a long (C & C++ seem to disagree about the definition of 0xF000)  }
  698.  
  699.  
  700. TYPE
  701.     DETItemType                            = UInt32;
  702. { FSSpec plus possibly interesting additional info }
  703.     DETFSInfoPtr = ^DETFSInfo;
  704.     DETFSInfo = RECORD
  705.         fileType:                OSType;                                    {  File type  }
  706.         fileCreator:            OSType;                                    {  File creator  }
  707.         fdFlags:                UInt16;                                    {  Finder flags  }
  708.         fsSpec:                    FSSpec;                                    {  FSSpec  }
  709.     END;
  710.  
  711.     DSRecPtr = ^DSRec;
  712.     DSRec = RECORD
  713.         dsSpec:                    ^PackedDSSpecPtr;                        {  <-  DSSpec for item (caller must DisposHandle() when done)  }
  714.         refNum:                    INTEGER;                                {  <-  Refnum for returned address  }
  715.         identity:                AuthIdentity;                            {  <-  Identity for returned address  }
  716.     END;
  717.  
  718.     ItemRecPtr = ^ItemRec;
  719.     ItemRec = RECORD
  720.         CASE INTEGER OF
  721.         0: (
  722.             fsInfo:                ^DETFSInfoPtr;                            {  <-  FSSpec & info for item (caller must DisposHandle() when done)  }
  723.             );
  724.         1: (
  725.             ds:                    DSRec;
  726.             );
  727.         2: (
  728.             dsSpec:                ^PackedDSSpecPtr;                        {  <-  DSSpec for item (caller must DisposHandle() when done)  }
  729.             );
  730.         3: (
  731.             ltrSpec:            ^LetterSpecPtr;                            {  <-  Letter spec for item (caller must DisposHandle() when done)  }
  732.             );
  733.     END;
  734.  
  735.     DETGetCommandItemNBlockPtr = ^DETGetCommandItemNBlock;
  736.     DETGetCommandItemNBlock = RECORD
  737.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  738.         itemNumber:                LONGINT;                                {   -> Item number to retrieve (1-based)  }
  739.         itemType:                DETItemType;                            {   -> Type of item to be returned (if we can interpret it as such)  }
  740.         item:                    ItemRec;
  741.     END;
  742.  
  743.     DETGetDSSpecBlockPtr = ^DETGetDSSpecBlock;
  744.     DETGetDSSpecBlock = RECORD
  745.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  746.         target:                    DETTargetSpecification;                    {  The target for the request  }
  747.         dsSpec:                    ^PackedDSSpecPtr;                        {  <-  Handle with result (caller must DisposHandle() when done)  }
  748.         refNum:                    INTEGER;                                {  <-  Refnum for address if PD  }
  749.         identity:                AuthIdentity;                            {  <-  Identity for address  }
  750.         isAlias:                BOOLEAN;                                {  <-  True if this entry is an alias  }
  751.         isRecordRef:            BOOLEAN;                                {  <-  True if this entry is a record reference (reserved)  }
  752.     END;
  753.  
  754.     DETGetTemplateFSSpecBlockPtr = ^DETGetTemplateFSSpecBlock;
  755.     DETGetTemplateFSSpecBlock = RECORD
  756.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  757.         target:                    DETTargetSpecification;                    {  The target for the request  }
  758.         fsSpec:                    FSSpec;                                    {  <-  FSSpec of template file  }
  759.         baseID:                    INTEGER;                                {  <-  Base ID of this template  }
  760.         aspectTemplateNumber:    LONGINT;                                {  <-  The template number for this aspect template  }
  761.     END;
  762.  
  763.     DETGetOpenEditBlockPtr = ^DETGetOpenEditBlock;
  764.     DETGetOpenEditBlock = RECORD
  765.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  766.         target:                    DETTargetSpecification;                    {  The target for the request  }
  767.         viewProperty:            INTEGER;                                {  <-  The property of the view being edited (or kNoProperty if none)  }
  768.     END;
  769.  
  770.     DETCloseEditBlockPtr = ^DETCloseEditBlock;
  771.     DETCloseEditBlock = RECORD
  772.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  773.         target:                    DETTargetSpecification;                    {  The target for the request  }
  774.     END;
  775.  
  776.     DETGetPropertyTypeBlockPtr = ^DETGetPropertyTypeBlock;
  777.     DETGetPropertyTypeBlock = RECORD
  778.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  779.         target:                    DETTargetSpecification;                    {  The target for the request  }
  780.         property:                INTEGER;                                {  The property to apply the request to  }
  781.         propertyType:            INTEGER;                                {  <-  The type of the property  }
  782.     END;
  783.  
  784.     DETGetPropertyNumberBlockPtr = ^DETGetPropertyNumberBlock;
  785.     DETGetPropertyNumberBlock = RECORD
  786.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  787.         target:                    DETTargetSpecification;                    {  The target for the request  }
  788.         property:                INTEGER;                                {  The property to apply the request to  }
  789.         propertyValue:            UInt32;                                    {  <-  The value of the property  }
  790.     END;
  791.  
  792.     DETGetPropertyRStringBlockPtr = ^DETGetPropertyRStringBlock;
  793.     DETGetPropertyRStringBlock = RECORD
  794.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  795.         target:                    DETTargetSpecification;                    {  The target for the request  }
  796.         property:                INTEGER;                                {  The property to apply the request to  }
  797.         propertyValue:            RStringHandle;                            {  <-  A handle containing the property (as an RString) (caller must DisposHandle() when done)  }
  798.     END;
  799.  
  800.     DETGetPropertyBinarySizeBlockPtr = ^DETGetPropertyBinarySizeBlock;
  801.     DETGetPropertyBinarySizeBlock = RECORD
  802.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  803.         target:                    DETTargetSpecification;                    {  The target for the request  }
  804.         property:                INTEGER;                                {  The property to apply the request to  }
  805.         propertyBinarySize:        LONGINT;                                {  <-  The size of the property as a binary block  }
  806.     END;
  807.  
  808.     DETGetPropertyBinaryBlockPtr = ^DETGetPropertyBinaryBlock;
  809.     DETGetPropertyBinaryBlock = RECORD
  810.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  811.         target:                    DETTargetSpecification;                    {  The target for the request  }
  812.         property:                INTEGER;                                {  The property to apply the request to  }
  813.         propertyValue:            Handle;                                    {  <-  Handle with the value of the property (caller must DisposHandle() when done)  }
  814.     END;
  815.  
  816.     DETGetPropertyChangedBlockPtr = ^DETGetPropertyChangedBlock;
  817.     DETGetPropertyChangedBlock = RECORD
  818.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  819.         target:                    DETTargetSpecification;                    {  The target for the request  }
  820.         property:                INTEGER;                                {  The property to apply the request to  }
  821.         propertyChanged:        BOOLEAN;                                {  <-  True if the property is marked as changed  }
  822.         filler1:                BOOLEAN;
  823.     END;
  824.  
  825.     DETGetPropertyEditableBlockPtr = ^DETGetPropertyEditableBlock;
  826.     DETGetPropertyEditableBlock = RECORD
  827.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  828.         target:                    DETTargetSpecification;                    {  The target for the request  }
  829.         property:                INTEGER;                                {  The property to apply the request to  }
  830.         propertyEditable:        BOOLEAN;                                {  <-  True if the property can be edited by the user (if false, view will appear disabled)  }
  831.         filler1:                BOOLEAN;
  832.     END;
  833.  
  834.     DETSetPropertyTypeBlockPtr = ^DETSetPropertyTypeBlock;
  835.     DETSetPropertyTypeBlock = RECORD
  836.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  837.         target:                    DETTargetSpecification;                    {  The target for the request  }
  838.         property:                INTEGER;                                {  The property to apply the request to  }
  839.         newType:                INTEGER;                                {   -> New type for property (just sets type, does not convert contents)  }
  840.     END;
  841.  
  842.     DETSetPropertyNumberBlockPtr = ^DETSetPropertyNumberBlock;
  843.     DETSetPropertyNumberBlock = RECORD
  844.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  845.         target:                    DETTargetSpecification;                    {  The target for the request  }
  846.         property:                INTEGER;                                {  The property to apply the request to  }
  847.         newValue:                UInt32;                                    {   -> New value to set property to (and set type to number)  }
  848.     END;
  849.  
  850.     DETSetPropertyRStringBlockPtr = ^DETSetPropertyRStringBlock;
  851.     DETSetPropertyRStringBlock = RECORD
  852.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  853.         target:                    DETTargetSpecification;                    {  The target for the request  }
  854.         property:                INTEGER;                                {  The property to apply the request to  }
  855.         newValue:                RStringPtr;                                {   -> New value to set property to (and set type to RString)  }
  856.     END;
  857.  
  858.     DETSetPropertyBinaryBlockPtr = ^DETSetPropertyBinaryBlock;
  859.     DETSetPropertyBinaryBlock = RECORD
  860.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  861.         target:                    DETTargetSpecification;                    {  The target for the request  }
  862.         property:                INTEGER;                                {  The property to apply the request to  }
  863.         newValue:                Ptr;                                    {   -> New value to set property to (and set type to binary)  }
  864.         newValueSize:            LONGINT;                                {   -> Size of new value  }
  865.     END;
  866.  
  867.     DETSetPropertyChangedBlockPtr = ^DETSetPropertyChangedBlock;
  868.     DETSetPropertyChangedBlock = RECORD
  869.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  870.         target:                    DETTargetSpecification;                    {  The target for the request  }
  871.         property:                INTEGER;                                {  The property to apply the request to  }
  872.         propertyChanged:        BOOLEAN;                                {   -> Value to set changed flag on property to  }
  873.         filler1:                BOOLEAN;
  874.     END;
  875.  
  876.     DETSetPropertyEditableBlockPtr = ^DETSetPropertyEditableBlock;
  877.     DETSetPropertyEditableBlock = RECORD
  878.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  879.         target:                    DETTargetSpecification;                    {  The target for the request  }
  880.         property:                INTEGER;                                {  The property to apply the request to  }
  881.         propertyEditable:        BOOLEAN;                                {   -> Value to set editable flag on property to  }
  882.         filler1:                BOOLEAN;
  883.     END;
  884.  
  885.     DETDirtyPropertyBlockPtr = ^DETDirtyPropertyBlock;
  886.     DETDirtyPropertyBlock = RECORD
  887.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  888.         target:                    DETTargetSpecification;                    {  The target for the request  }
  889.         property:                INTEGER;                                {  The property to apply the request to  }
  890.     END;
  891.  
  892.     DETDoPropertyCommandBlockPtr = ^DETDoPropertyCommandBlock;
  893.     DETDoPropertyCommandBlock = RECORD
  894.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  895.         target:                    DETTargetSpecification;                    {  The target for the request  }
  896.         property:                INTEGER;                                {  The property to apply the request to  }
  897.         parameter:                LONGINT;                                {  ->  Parameter of command  }
  898.     END;
  899.  
  900.     DETSublistCountBlockPtr = ^DETSublistCountBlock;
  901.     DETSublistCountBlock = RECORD
  902.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  903.         target:                    DETTargetSpecification;                    {  The target for the request  }
  904.         count:                    LONGINT;                                {  <-  The number of items in the current item's sublist  }
  905.     END;
  906.  
  907.     DETSelectedSublistCountBlockPtr = ^DETSelectedSublistCountBlock;
  908.     DETSelectedSublistCountBlock = RECORD
  909.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  910.         target:                    DETTargetSpecification;                    {  The target for the request  }
  911.         count:                    LONGINT;                                {  <-  The number of selected items in the current item's sublist  }
  912.     END;
  913.  
  914.     DETRequestSyncBlockPtr = ^DETRequestSyncBlock;
  915.     DETRequestSyncBlock = RECORD
  916.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  917.         target:                    DETTargetSpecification;                    {  The target for the request  }
  918.     END;
  919.  
  920.     DETAddMenuBlockPtr = ^DETAddMenuBlock;
  921.     DETAddMenuBlock = RECORD
  922.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  923.         target:                    DETTargetSpecification;                    {  The target for the request  }
  924.         property:                INTEGER;                                {  The property to apply the request to  }
  925.         name:                    RStringPtr;                                {   -> Name of new menu item  }
  926.         parameter:                LONGINT;                                {   -> Parameter to return when this item is selected  }
  927.         addAfter:                LONGINT;                                {   -> Parameter of entry to add after, or -1 for add at end  }
  928.     END;
  929.  
  930.     DETRemoveMenuBlockPtr = ^DETRemoveMenuBlock;
  931.     DETRemoveMenuBlock = RECORD
  932.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  933.         target:                    DETTargetSpecification;                    {  The target for the request  }
  934.         property:                INTEGER;                                {  The property to apply the request to  }
  935.         itemToRemove:            LONGINT;                                {   -> Parameter of menu item to remove  }
  936.     END;
  937.  
  938.     DETMenuItemRStringBlockPtr = ^DETMenuItemRStringBlock;
  939.     DETMenuItemRStringBlock = RECORD
  940.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  941.         target:                    DETTargetSpecification;                    {  The target for the request  }
  942.         property:                INTEGER;                                {  The property to apply the request to  }
  943.         itemParameter:            LONGINT;                                {   -> Parameter of menu item to return string for  }
  944.         rString:                RStringHandle;                            {  <-  Handle with the RString (caller must DisposHandle() when done)  }
  945.     END;
  946.  
  947.     DETOpenDSSpecBlockPtr = ^DETOpenDSSpecBlock;
  948.     DETOpenDSSpecBlock = RECORD
  949.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  950.         dsSpec:                    PackedDSSpecPtr;                        {   -> DSSpec of object to be opened  }
  951.     END;
  952.  
  953.     DETAboutToTalkBlockPtr = ^DETAboutToTalkBlock;
  954.     DETAboutToTalkBlock = RECORD
  955.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  956.     END;
  957.  
  958.     DETBreakAttributeBlockPtr = ^DETBreakAttributeBlock;
  959.     DETBreakAttributeBlock = RECORD
  960.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  961.         target:                    DETTargetSpecification;                    {  The target for the request  }
  962.         breakAttribute:            AttributePtr;                            {   -> Attribute to parse  }
  963.         isChangeable:            BOOLEAN;                                {   -> True if the value can be changed by the user  }
  964.         filler1:                BOOLEAN;
  965.     END;
  966.  
  967.     DETSavePropertyBlockPtr = ^DETSavePropertyBlock;
  968.     DETSavePropertyBlock = RECORD
  969.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  970.         target:                    DETTargetSpecification;                    {  The target for the request  }
  971.         property:                INTEGER;                                {  The property to apply the request to  }
  972.     END;
  973.  
  974.     DETGetCustomViewUserReferenceBlockPtr = ^DETGetCustomViewUserReferenceBlock;
  975.     DETGetCustomViewUserReferenceBlock = RECORD
  976.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  977.         target:                    DETTargetSpecification;                    {  The target for the request  }
  978.         property:                INTEGER;                                {  The property to apply the request to  }
  979.         userReference:            INTEGER;                                {  <-  User reference value, as specified in the .r file  }
  980.     END;
  981.  
  982.     DETGetCustomViewBoundsBlockPtr = ^DETGetCustomViewBoundsBlock;
  983.     DETGetCustomViewBoundsBlock = RECORD
  984.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  985.         target:                    DETTargetSpecification;                    {  The target for the request  }
  986.         property:                INTEGER;                                {  The property to apply the request to  }
  987.         bounds:                    Rect;                                    {  <-  Bounds of the view  }
  988.     END;
  989.  
  990.     DETGetResourceBlockPtr = ^DETGetResourceBlock;
  991.     DETGetResourceBlock = RECORD
  992.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  993.         target:                    DETTargetSpecification;                    {  The target for the request  }
  994.         property:                INTEGER;                                {  The property to apply the request to  }
  995.         resourceType:            ResType;                                {   -> Resource type  }
  996.         theResource:            Handle;                                    {  <-  The resource handle (caller must dispose when done)  }
  997.     END;
  998.  
  999.     DETTemplateCountsPtr = ^DETTemplateCounts;
  1000.     DETTemplateCounts = RECORD
  1001.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  1002.         aspectTemplateCount:    LONGINT;                                {  <-  Number of aspect templates in the system  }
  1003.         infoPageTemplateCount:    LONGINT;                                {  <-  Number of info-page templates in the system  }
  1004.     END;
  1005.  
  1006.     DETUnloadTemplatesBlockPtr = ^DETUnloadTemplatesBlock;
  1007.     DETUnloadTemplatesBlock = RECORD
  1008.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  1009.     END;
  1010.  
  1011.  
  1012.     DETCallBackBlockPtr = ^DETCallBackBlock;
  1013.     DETCallBackBlock = RECORD
  1014.         CASE INTEGER OF
  1015.         0: (
  1016.             protoCallBack:        DETProtoCallBackBlock;
  1017.             );
  1018.         1: (
  1019.             beep:                DETBeepBlock;
  1020.             );
  1021.         2: (
  1022.             busy:                DETBusyBlock;
  1023.             );
  1024.         3: (
  1025.             changeCallFors:        DETChangeCallForsBlock;
  1026.             );
  1027.         4: (
  1028.             getCommandSelectionCount: DETGetCommandSelectionCountBlock;
  1029.             );
  1030.         5: (
  1031.             getCommandItemN:    DETGetCommandItemNBlock;
  1032.             );
  1033.         6: (
  1034.             getDSSpec:            DETGetDSSpecBlock;
  1035.             );
  1036.         7: (
  1037.             getTemplateFSSpec:    DETGetTemplateFSSpecBlock;
  1038.             );
  1039.         8: (
  1040.             getOpenEdit:        DETGetOpenEditBlock;
  1041.             );
  1042.         9: (
  1043.             closeEdit:            DETCloseEditBlock;
  1044.             );
  1045.         10: (
  1046.             getPropertyType:    DETGetPropertyTypeBlock;
  1047.             );
  1048.         11: (
  1049.             getPropertyNumber:    DETGetPropertyNumberBlock;
  1050.             );
  1051.         12: (
  1052.             getPropertyRString:    DETGetPropertyRStringBlock;
  1053.             );
  1054.         13: (
  1055.             getPropertyBinarySize: DETGetPropertyBinarySizeBlock;
  1056.             );
  1057.         14: (
  1058.             getPropertyBinary:    DETGetPropertyBinaryBlock;
  1059.             );
  1060.         15: (
  1061.             getPropertyChanged:    DETGetPropertyChangedBlock;
  1062.             );
  1063.         16: (
  1064.             getPropertyEditable: DETGetPropertyEditableBlock;
  1065.             );
  1066.         17: (
  1067.             setPropertyType:    DETSetPropertyTypeBlock;
  1068.             );
  1069.         18: (
  1070.             setPropertyNumber:    DETSetPropertyNumberBlock;
  1071.             );
  1072.         19: (
  1073.             setPropertyRString:    DETSetPropertyRStringBlock;
  1074.             );
  1075.         20: (
  1076.             setPropertyBinary:    DETSetPropertyBinaryBlock;
  1077.             );
  1078.         21: (
  1079.             setPropertyChanged:    DETSetPropertyChangedBlock;
  1080.             );
  1081.         22: (
  1082.             setPropertyEditable: DETSetPropertyEditableBlock;
  1083.             );
  1084.         23: (
  1085.             dirtyProperty:        DETDirtyPropertyBlock;
  1086.             );
  1087.         24: (
  1088.             doPropertyCommand:    DETDoPropertyCommandBlock;
  1089.             );
  1090.         25: (
  1091.             sublistCount:        DETSublistCountBlock;
  1092.             );
  1093.         26: (
  1094.             selectedSublistCount: DETSelectedSublistCountBlock;
  1095.             );
  1096.         27: (
  1097.             requestSync:        DETRequestSyncBlock;
  1098.             );
  1099.         28: (
  1100.             addMenu:            DETAddMenuBlock;
  1101.             );
  1102.         29: (
  1103.             removeMenu:            DETRemoveMenuBlock;
  1104.             );
  1105.         30: (
  1106.             menuItemRString:    DETMenuItemRStringBlock;
  1107.             );
  1108.         31: (
  1109.             openDSSpec:            DETOpenDSSpecBlock;
  1110.             );
  1111.         32: (
  1112.             aboutToTalk:        DETAboutToTalkBlock;
  1113.             );
  1114.         33: (
  1115.             breakAttribute:        DETBreakAttributeBlock;
  1116.             );
  1117.         34: (
  1118.             saveProperty:        DETSavePropertyBlock;
  1119.             );
  1120.         35: (
  1121.             getCustomViewUserReference: DETGetCustomViewUserReferenceBlock;
  1122.             );
  1123.         36: (
  1124.             getCustomViewBounds: DETGetCustomViewBoundsBlock;
  1125.             );
  1126.         37: (
  1127.             getResource:        DETGetResourceBlock;
  1128.             );
  1129.         38: (
  1130.             templateCounts:        DETTemplateCounts;
  1131.             );
  1132.         39: (
  1133.             unloadTemplates:    DETUnloadTemplatesBlock;
  1134.             );
  1135.     END;
  1136.  
  1137.     DETCallBlockPtr = ^DETCallBlock;
  1138. {$IFC TYPED_FUNCTION_POINTERS}
  1139.     DETCallBackProcPtr = FUNCTION(VAR callBlockPtr: DETCallBlock; callBackBlockPtr: DETCallBackBlockPtr): OSErr;
  1140. {$ELSEC}
  1141.     DETCallBackProcPtr = ProcPtr;
  1142. {$ENDC}
  1143.  
  1144.     DETCallBackUPP = UniversalProcPtr;
  1145.     DETCallBack                            = DETCallBackUPP;
  1146.     DETProtoCallBlockPtr = ^DETProtoCallBlock;
  1147.     DETProtoCallBlock = RECORD
  1148.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1149.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1150.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1151.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1152.                                                                         {     common to all invocations of code resource)  }
  1153.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1154.                                                                         {     code resource)  }
  1155.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1156.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1157.         filler1:                BOOLEAN;
  1158.         property:                INTEGER;                                {  The property number the call refers to  }
  1159.     END;
  1160.  
  1161.     DETInitBlockPtr = ^DETInitBlock;
  1162.     DETInitBlock = RECORD
  1163.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1164.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1165.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1166.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource, common to all invocations of code resource)  }
  1167.         newCallFors:            LONGINT;                                {  <-  New call-for mask  }
  1168.     END;
  1169.  
  1170.     DETExitBlockPtr = ^DETExitBlock;
  1171.     DETExitBlock = RECORD
  1172.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1173.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1174.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1175.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource, common to all invocations of code resource)  }
  1176.     END;
  1177.  
  1178.     DETInstanceInitBlockPtr = ^DETInstanceInitBlock;
  1179.     DETInstanceInitBlock = RECORD
  1180.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1181.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1182.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1183.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1184.                                                                         {     common to all invocations of code resource)  }
  1185.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1186.                                                                         {     code resource)  }
  1187.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1188.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1189.         filler1:                BOOLEAN;
  1190.     END;
  1191.  
  1192.     DETInstanceExitBlockPtr = ^DETInstanceExitBlock;
  1193.     DETInstanceExitBlock = RECORD
  1194.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1195.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1196.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1197.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1198.                                                                         {     common to all invocations of code resource)  }
  1199.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1200.                                                                         {     code resource)  }
  1201.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1202.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1203.         filler1:                BOOLEAN;
  1204.     END;
  1205.  
  1206.     DETInstanceIdleBlockPtr = ^DETInstanceIdleBlock;
  1207.     DETInstanceIdleBlock = RECORD
  1208.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1209.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1210.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1211.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1212.                                                                         {     common to all invocations of code resource)  }
  1213.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1214.                                                                         {     code resource)  }
  1215.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1216.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1217.         filler1:                BOOLEAN;
  1218.     END;
  1219.  
  1220.     DETPropertyCommandBlockPtr = ^DETPropertyCommandBlock;
  1221.     DETPropertyCommandBlock = RECORD
  1222.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1223.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1224.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1225.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1226.                                                                         {     common to all invocations of code resource)  }
  1227.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1228.                                                                         {     code resource)  }
  1229.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1230.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1231.         filler1:                BOOLEAN;
  1232.         property:                INTEGER;                                {  The property number the call refers to  }
  1233.         parameter:                LONGINT;                                {   -> Parameter of command  }
  1234.     END;
  1235.  
  1236.     DETMaximumTextLengthBlockPtr = ^DETMaximumTextLengthBlock;
  1237.     DETMaximumTextLengthBlock = RECORD
  1238.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1239.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1240.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1241.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1242.                                                                         {     common to all invocations of code resource)  }
  1243.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1244.                                                                         {     code resource)  }
  1245.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1246.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1247.         filler1:                BOOLEAN;
  1248.         property:                INTEGER;                                {  The property number the call refers to  }
  1249.         maxSize:                LONGINT;                                {  <-  Return the maximum number of characters the user can entry when property is edited in an EditText  }
  1250.     END;
  1251.  
  1252.     DETViewListChangedBlockPtr = ^DETViewListChangedBlock;
  1253.     DETViewListChangedBlock = RECORD
  1254.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1255.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1256.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1257.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1258.                                                                         {     common to all invocations of code resource)  }
  1259.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1260.                                                                         {     code resource)  }
  1261.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1262.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1263.         filler1:                BOOLEAN;
  1264.     END;
  1265.  
  1266.     DETPropertyDirtiedBlockPtr = ^DETPropertyDirtiedBlock;
  1267.     DETPropertyDirtiedBlock = RECORD
  1268.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1269.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1270.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1271.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1272.                                                                         {     common to all invocations of code resource)  }
  1273.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1274.                                                                         {     code resource)  }
  1275.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1276.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1277.         filler1:                BOOLEAN;
  1278.         property:                INTEGER;                                {  The property number the call refers to  }
  1279.     END;
  1280.  
  1281.     DETValidateSaveBlockPtr = ^DETValidateSaveBlock;
  1282.     DETValidateSaveBlock = RECORD
  1283.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1284.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1285.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1286.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1287.                                                                         {     common to all invocations of code resource)  }
  1288.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1289.                                                                         {     code resource)  }
  1290.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1291.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1292.         filler1:                BOOLEAN;
  1293.         errorString:            RStringHandle;                            {  <-  Handle with error string if validation fails (callee must allocate handle, DE will DisposHandle() it)  }
  1294.     END;
  1295.  
  1296.     DETDropQueryBlockPtr = ^DETDropQueryBlock;
  1297.     DETDropQueryBlock = RECORD
  1298.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1299.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1300.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1301.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1302.                                                                         {     common to all invocations of code resource)  }
  1303.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1304.                                                                         {     code resource)  }
  1305.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1306.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1307.         filler1:                BOOLEAN;
  1308.         modifiers:                INTEGER;                                {   -> Modifiers at drop time (option/control/command/shift keys)  }
  1309.         commandID:                LONGINT;                                {  <-> Command ID (kDETDoNothing, kDETMove, kDETDrag (copy), kDETAlias, or a property number)  }
  1310.         destinationType:        AttributeType;                            {  <-> Type to convert attribute to  }
  1311.         copyToHFS:                BOOLEAN;                                {  <-  If true, object should be copied to HFS before being operated on, and deleted after  }
  1312.         filler2:                BOOLEAN;
  1313.     END;
  1314.  
  1315.     DETDropMeQueryBlockPtr = ^DETDropMeQueryBlock;
  1316.     DETDropMeQueryBlock = RECORD
  1317.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1318.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1319.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1320.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1321.                                                                         {     common to all invocations of code resource)  }
  1322.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1323.                                                                         {     code resource)  }
  1324.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1325.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1326.         filler1:                BOOLEAN;
  1327.         modifiers:                INTEGER;                                {   -> Modifiers at drop time (option/control/command/shift keys)  }
  1328.         commandID:                LONGINT;                                {  <-> Command ID (kDETDoNothing, kDETMove, kDETDrag (copy), kDETAlias, or a property number)  }
  1329.         destinationType:        AttributeType;                            {  <-> Type to convert attribute to  }
  1330.         copyToHFS:                BOOLEAN;                                {  <-  If true, object should be copied to HFS before being operated on, and deleted after  }
  1331.         filler2:                BOOLEAN;
  1332.     END;
  1333.  
  1334.     DETAttributeCreationBlockPtr = ^DETAttributeCreationBlock;
  1335.     DETAttributeCreationBlock = RECORD
  1336.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1337.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1338.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1339.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource, common to all invocations of code resource)  }
  1340.         parent:                    PackedDSSpecPtr;                        {   -> The object within which the creation will occur  }
  1341.         refNum:                    INTEGER;                                {   -> Refnum for returned address (DSSpecs in PDs only)  }
  1342.         identity:                AuthIdentity;                            {   -> The identity we're browsing as in the parent object  }
  1343.         attrType:                AttributeType;                            {  <-> The type of the attribute being created  }
  1344.         attrTag:                AttributeTag;                            {  <-> The tag of the attribute being created  }
  1345.         value:                    Handle;                                    {  <-> The value to write (pre-allocated, resize as needed)  }
  1346.     END;
  1347.  
  1348.     DETAttributeNewBlockPtr = ^DETAttributeNewBlock;
  1349.     DETAttributeNewBlock = RECORD
  1350.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1351.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1352.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1353.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1354.                                                                         {     common to all invocations of code resource)  }
  1355.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1356.                                                                         {     code resource)  }
  1357.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1358.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1359.         filler1:                BOOLEAN;
  1360.         parent:                    PackedDSSpecPtr;                        {   -> The object within which the creation will occur  }
  1361.         refNum:                    INTEGER;                                {   -> Refnum for returned address (DSSpecs in PDs only)  }
  1362.         identity:                AuthIdentity;                            {   -> The identity we're browsing as in the parent object  }
  1363.         attrType:                AttributeType;                            {  <-> The type of the attribute being created  }
  1364.         attrTag:                AttributeTag;                            {  <-> The tag of the attribute being created  }
  1365.         value:                    Handle;                                    {  <-> The value to write (pre-allocated, resize as needed)  }
  1366.     END;
  1367.  
  1368.     DETAttributeChangeBlockPtr = ^DETAttributeChangeBlock;
  1369.     DETAttributeChangeBlock = RECORD
  1370.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1371.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1372.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1373.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1374.                                                                         {     common to all invocations of code resource)  }
  1375.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1376.                                                                         {     code resource)  }
  1377.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1378.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1379.         filler1:                BOOLEAN;
  1380.         parent:                    PackedDSSpecPtr;                        {   -> The object within which the creation will occur  }
  1381.         refNum:                    INTEGER;                                {   -> Refnum for returned address (DSSpecs in PDs only)  }
  1382.         identity:                AuthIdentity;                            {   -> The identity we're browsing as in the parent object  }
  1383.         attrType:                AttributeType;                            {  <-> The type of the attribute being changed  }
  1384.         attrTag:                AttributeTag;                            {  <-> The tag of the attribute being changed  }
  1385.         attrCID:                AttributeCreationID;                    {  <-> The CID of the attribute being changed  }
  1386.         value:                    Handle;                                    {  <-> The value to write (pre-allocated, resize as needed)  }
  1387.     END;
  1388.  
  1389.     DETAttributeDeleteBlockPtr = ^DETAttributeDeleteBlock;
  1390.     DETAttributeDeleteBlock = RECORD
  1391.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1392.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1393.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1394.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1395.                                                                         {     common to all invocations of code resource)  }
  1396.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1397.                                                                         {     code resource)  }
  1398.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1399.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1400.         filler1:                BOOLEAN;
  1401.         dsSpec:                    PackedDSSpecPtr;                        {   -> The object which will be deleted  }
  1402.         refNum:                    INTEGER;                                {   -> Refnum for returned address (DSSpecs in PDs only)  }
  1403.         identity:                AuthIdentity;                            {   -> The identity we're browsing as  }
  1404.     END;
  1405.  
  1406.     DETItemNewBlockPtr = ^DETItemNewBlock;
  1407.     DETItemNewBlock = RECORD
  1408.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1409.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1410.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1411.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1412.                                                                         {     common to all invocations of code resource)  }
  1413.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1414.                                                                         {     code resource)  }
  1415.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1416.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1417.         filler1:                BOOLEAN;
  1418.     END;
  1419.  
  1420.     DETShouldSyncBlockPtr = ^DETShouldSyncBlock;
  1421.     DETShouldSyncBlock = RECORD
  1422.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1423.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1424.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1425.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1426.                                                                         {     common to all invocations of code resource)  }
  1427.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1428.                                                                         {     code resource)  }
  1429.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1430.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1431.         filler1:                BOOLEAN;
  1432.         shouldSync:                BOOLEAN;                                {  <-  True if we should now sync with catalog  }
  1433.         filler2:                BOOLEAN;
  1434.     END;
  1435.  
  1436.     DETDoSyncBlockPtr = ^DETDoSyncBlock;
  1437.     DETDoSyncBlock = RECORD
  1438.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1439.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1440.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1441.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1442.                                                                         {     common to all invocations of code resource)  }
  1443.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1444.                                                                         {     code resource)  }
  1445.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1446.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1447.         filler1:                BOOLEAN;
  1448.     END;
  1449.  
  1450.     DETPatternInBlockPtr = ^DETPatternInBlock;
  1451.     DETPatternInBlock = RECORD
  1452.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1453.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1454.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1455.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1456.                                                                         {     common to all invocations of code resource)  }
  1457.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1458.                                                                         {     code resource)  }
  1459.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1460.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1461.         filler1:                BOOLEAN;
  1462.         property:                INTEGER;                                {  The property number the call refers to  }
  1463.         elementType:            LONGINT;                                {   -> Element type from pattern  }
  1464.         extra:                    LONGINT;                                {   -> Extra field from pattern  }
  1465.         attribute:                AttributePtr;                            {   -> The complete attribute  }
  1466.         dataOffset:                LONGINT;                                {  <-> Offset to current (next) byte  }
  1467.         bitOffset:                INTEGER;                                {  <-> Bit offset (next bit is *fData >> fBitOffset++)  }
  1468.     END;
  1469.  
  1470.     DETPatternOutBlockPtr = ^DETPatternOutBlock;
  1471.     DETPatternOutBlock = RECORD
  1472.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1473.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1474.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1475.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1476.                                                                         {     common to all invocations of code resource)  }
  1477.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1478.                                                                         {     code resource)  }
  1479.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1480.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1481.         filler1:                BOOLEAN;
  1482.         property:                INTEGER;                                {  The property number the call refers to  }
  1483.         elementType:            LONGINT;                                {   -> Element type from pattern  }
  1484.         extra:                    LONGINT;                                {   -> Extra field from pattern  }
  1485.         attribute:                AttributePtr;                            {   -> The attribute (minus the data portion)  }
  1486.         data:                    Handle;                                    {   -> Data to be written (pre-allocated, resize and add at end)  }
  1487.         dataOffset:                LONGINT;                                {  <-> Offset to next byte to write  }
  1488.         bitOffset:                INTEGER;                                {  <-> Bit offset (if zero, handle will need to be resized to one more byte before write)  }
  1489.     END;
  1490.  
  1491.     DETOpenSelfBlockPtr = ^DETOpenSelfBlock;
  1492.     DETOpenSelfBlock = RECORD
  1493.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1494.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1495.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1496.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1497.                                                                         {     common to all invocations of code resource)  }
  1498.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1499.                                                                         {     code resource)  }
  1500.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1501.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1502.         filler1:                BOOLEAN;
  1503.         modifiers:                INTEGER;                                {   -> Modifiers at open time (option/control/command/shift keys)  }
  1504.     END;
  1505.  
  1506.     DETConvertToNumberBlockPtr = ^DETConvertToNumberBlock;
  1507.     DETConvertToNumberBlock = RECORD
  1508.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1509.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1510.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1511.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1512.                                                                         {     common to all invocations of code resource)  }
  1513.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1514.                                                                         {     code resource)  }
  1515.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1516.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1517.         filler1:                BOOLEAN;
  1518.         property:                INTEGER;                                {  The property number the call refers to  }
  1519.         theValue:                LONGINT;                                {  <-  The converted value to return  }
  1520.     END;
  1521.  
  1522.     DETConvertToRStringBlockPtr = ^DETConvertToRStringBlock;
  1523.     DETConvertToRStringBlock = RECORD
  1524.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1525.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1526.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1527.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1528.                                                                         {     common to all invocations of code resource)  }
  1529.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1530.                                                                         {     code resource)  }
  1531.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1532.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1533.         filler1:                BOOLEAN;
  1534.         property:                INTEGER;                                {  The property number the call refers to  }
  1535.         theValue:                RStringHandle;                            {  <-  A handle with the converted value (callee must allocate handle, DE will DisposHandle() it)  }
  1536.     END;
  1537.  
  1538.     DETConvertFromNumberBlockPtr = ^DETConvertFromNumberBlock;
  1539.     DETConvertFromNumberBlock = RECORD
  1540.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1541.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1542.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1543.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1544.                                                                         {     common to all invocations of code resource)  }
  1545.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1546.                                                                         {     code resource)  }
  1547.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1548.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1549.         filler1:                BOOLEAN;
  1550.         property:                INTEGER;                                {  The property number the call refers to  }
  1551.         theValue:                LONGINT;                                {   -> The value to convert (result should be written direct to the property)  }
  1552.     END;
  1553.  
  1554.     DETConvertFromRStringBlockPtr = ^DETConvertFromRStringBlock;
  1555.     DETConvertFromRStringBlock = RECORD
  1556.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1557.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1558.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1559.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1560.                                                                         {     common to all invocations of code resource)  }
  1561.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1562.                                                                         {     code resource)  }
  1563.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1564.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1565.         filler1:                BOOLEAN;
  1566.         property:                INTEGER;                                {  The property number the call refers to  }
  1567.         theValue:                RStringPtr;                                {   -> The value to convert (result should be written direct to the property)  }
  1568.     END;
  1569.  
  1570.     DETCustomViewDrawBlockPtr = ^DETCustomViewDrawBlock;
  1571.     DETCustomViewDrawBlock = RECORD
  1572.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1573.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1574.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1575.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1576.                                                                         {     common to all invocations of code resource)  }
  1577.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1578.                                                                         {     code resource)  }
  1579.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1580.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1581.         filler1:                BOOLEAN;
  1582.         property:                INTEGER;                                {  The property number the call refers to  }
  1583.     END;
  1584.  
  1585.     DETCustomViewMouseDownBlockPtr = ^DETCustomViewMouseDownBlock;
  1586.     DETCustomViewMouseDownBlock = RECORD
  1587.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1588.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1589.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1590.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1591.                                                                         {     common to all invocations of code resource)  }
  1592.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1593.                                                                         {     code resource)  }
  1594.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1595.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1596.         filler1:                BOOLEAN;
  1597.         property:                INTEGER;                                {  The property number the call refers to  }
  1598.         theEvent:                EventRecordPtr;                            {   -> The original event record of the mouse-down  }
  1599.     END;
  1600.  
  1601.     DETKeyPressBlockPtr = ^DETKeyPressBlock;
  1602.     DETKeyPressBlock = RECORD
  1603.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1604.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1605.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1606.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1607.                                                                         {     common to all invocations of code resource)  }
  1608.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1609.                                                                         {     code resource)  }
  1610.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1611.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1612.         filler1:                BOOLEAN;
  1613.         property:                INTEGER;                                {  The property number the call refers to  }
  1614.         theEvent:                EventRecordPtr;                            {   -> The original event record of the key-press  }
  1615.     END;
  1616.  
  1617.     DETPasteBlockPtr = ^DETPasteBlock;
  1618.     DETPasteBlock = RECORD
  1619.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1620.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1621.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1622.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1623.                                                                         {     common to all invocations of code resource)  }
  1624.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1625.                                                                         {     code resource)  }
  1626.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1627.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1628.         filler1:                BOOLEAN;
  1629.         property:                INTEGER;                                {  The property number the call refers to  }
  1630.         modifiers:                INTEGER;                                {   -> Modifiers at paste time (option/control/command/shift keys)  }
  1631.     END;
  1632.  
  1633.     DETCustomMenuSelectedBlockPtr = ^DETCustomMenuSelectedBlock;
  1634.     DETCustomMenuSelectedBlock = RECORD
  1635.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1636.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1637.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1638.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1639.                                                                         {     common to all invocations of code resource)  }
  1640.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1641.                                                                         {     code resource)  }
  1642.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1643.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1644.         filler1:                BOOLEAN;
  1645.         menuTableParameter:        INTEGER;                                {   -> The "property" field from the custom menu table  }
  1646.     END;
  1647.  
  1648.     DETCustomMenuEnabledBlockPtr = ^DETCustomMenuEnabledBlock;
  1649.     DETCustomMenuEnabledBlock = RECORD
  1650.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1651.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1652.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1653.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1654.                                                                         {     common to all invocations of code resource)  }
  1655.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1656.                                                                         {     code resource)  }
  1657.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1658.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1659.         filler1:                BOOLEAN;
  1660.         menuTableParameter:        INTEGER;                                {   -> The "property" field from the custom menu table  }
  1661.         enable:                    BOOLEAN;                                {  <-  Whether to enable the menu item  }
  1662.         filler2:                BOOLEAN;
  1663.     END;
  1664.  
  1665.     DETForwarderListItemPtr = ^DETForwarderListItem;
  1666.     DETForwarderListItem = RECORD
  1667.         next:                    ^DETForwarderListItemPtr;                {  Pointer to next item, or nil  }
  1668.         attributeValueTag:        AttributeTag;                            {  Tag of new templates (0 for none)  }
  1669.         rstrs:                    PackedPathName;                            {  Record type (empty if none), attrbute type (empty if none),list of template names to forward to  }
  1670.     END;
  1671.  
  1672.     DETForwarderListPtr                    = ^DETForwarderListItem;
  1673.     DETForwarderListHandle                = ^DETForwarderListPtr;
  1674.     DETDynamicForwardersBlockPtr = ^DETDynamicForwardersBlock;
  1675.     DETDynamicForwardersBlock = RECORD
  1676.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1677.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1678.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1679.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource, common to all invocations of code resource)  }
  1680.         forwarders:                DETForwarderListHandle;                    {  <-  List of forwaders  }
  1681.     END;
  1682.  
  1683.     DETDynamicResourceBlockPtr = ^DETDynamicResourceBlock;
  1684.     DETDynamicResourceBlock = RECORD
  1685.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1686.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1687.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1688.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1689.                                                                         {     common to all invocations of code resource)  }
  1690.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1691.                                                                         {     code resource)  }
  1692.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1693.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1694.         filler1:                BOOLEAN;
  1695.         resourceType:            ResType;                                {   -> The resource type being requested  }
  1696.         propertyNumber:            INTEGER;                                {   -> The property number of the resource being requested  }
  1697.         resourceID:                INTEGER;                                {   -> The resource ID (base ID + property number) of the resource  }
  1698.         theResource:            Handle;                                    {  <-  The requested resource  }
  1699.     END;
  1700.  
  1701.  
  1702.     DETCallBlock = RECORD
  1703.         CASE INTEGER OF
  1704.         0: (
  1705.             protoCall:            DETProtoCallBlock;
  1706.             );
  1707.         1: (
  1708.             init:                DETInitBlock;
  1709.             );
  1710.         2: (
  1711.             exit:                DETExitBlock;
  1712.             );
  1713.         3: (
  1714.             instanceInit:        DETInstanceInitBlock;
  1715.             );
  1716.         4: (
  1717.             instanceExit:        DETInstanceExitBlock;
  1718.             );
  1719.         5: (
  1720.             instanceIdle:        DETInstanceIdleBlock;
  1721.             );
  1722.         6: (
  1723.             propertyCommand:    DETPropertyCommandBlock;
  1724.             );
  1725.         7: (
  1726.             maximumTextLength:    DETMaximumTextLengthBlock;
  1727.             );
  1728.         8: (
  1729.             viewListChanged:    DETViewListChangedBlock;
  1730.             );
  1731.         9: (
  1732.             propertyDirtied:    DETPropertyDirtiedBlock;
  1733.             );
  1734.         10: (
  1735.             validateSave:        DETValidateSaveBlock;
  1736.             );
  1737.         11: (
  1738.             dropQuery:            DETDropQueryBlock;
  1739.             );
  1740.         12: (
  1741.             dropMeQuery:        DETDropMeQueryBlock;
  1742.             );
  1743.         13: (
  1744.             attributeCreationBlock: DETAttributeCreationBlock;
  1745.             );
  1746.         14: (
  1747.             attributeNew:        DETAttributeNewBlock;
  1748.             );
  1749.         15: (
  1750.             attributeChange:    DETAttributeChangeBlock;
  1751.             );
  1752.         16: (
  1753.             attributeDelete:    DETAttributeDeleteBlock;
  1754.             );
  1755.         17: (
  1756.             itemNew:            DETItemNewBlock;
  1757.             );
  1758.         18: (
  1759.             patternIn:            DETPatternInBlock;
  1760.             );
  1761.         19: (
  1762.             patternOut:            DETPatternOutBlock;
  1763.             );
  1764.         20: (
  1765.             shouldSync:            DETShouldSyncBlock;
  1766.             );
  1767.         21: (
  1768.             doSync:                DETDoSyncBlock;
  1769.             );
  1770.         22: (
  1771.             openSelf:            DETOpenSelfBlock;
  1772.             );
  1773.         23: (
  1774.             convertToNumber:    DETConvertToNumberBlock;
  1775.             );
  1776.         24: (
  1777.             convertToRString:    DETConvertToRStringBlock;
  1778.             );
  1779.         25: (
  1780.             convertFromNumber:    DETConvertFromNumberBlock;
  1781.             );
  1782.         26: (
  1783.             convertFromRString:    DETConvertFromRStringBlock;
  1784.             );
  1785.         27: (
  1786.             customViewDraw:        DETCustomViewDrawBlock;
  1787.             );
  1788.         28: (
  1789.             customViewMouseDown: DETCustomViewMouseDownBlock;
  1790.             );
  1791.         29: (
  1792.             keyPress:            DETKeyPressBlock;
  1793.             );
  1794.         30: (
  1795.             paste:                DETPasteBlock;
  1796.             );
  1797.         31: (
  1798.             customMenuSelected:    DETCustomMenuSelectedBlock;
  1799.             );
  1800.         32: (
  1801.             customMenuEnabled:    DETCustomMenuEnabledBlock;
  1802.             );
  1803.         33: (
  1804.             dynamicForwarders:    DETDynamicForwardersBlock;
  1805.             );
  1806.         34: (
  1807.             dynamicResource:    DETDynamicResourceBlock;
  1808.             );
  1809.     END;
  1810.  
  1811.  
  1812. CONST
  1813.     uppDETCallBackProcInfo = $000003E0;
  1814.  
  1815. FUNCTION CallDETCallBackProc(VAR callBlockPtr: DETCallBlock; callBackBlockPtr: DETCallBackBlockPtr; userRoutine: DETCallBackUPP): OSErr;
  1816.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1817.     INLINE $205F, $4E90;
  1818.     {$ENDC}
  1819.  
  1820. FUNCTION NewDETCallBackProc(userRoutine: DETCallBackProcPtr): DETCallBackUPP;
  1821.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1822.     INLINE $2E9F;
  1823.     {$ENDC}
  1824. { Call-for list: }
  1825.  
  1826. CONST
  1827.     kDETCallForOther            = 1;                            {  Call for things not listed below (also auto-enabled by DE if any of the below are enabled)  }
  1828.     kDETCallForIdle                = 2;                            {  kDETcmdIdle  }
  1829.     kDETCallForCommands            = 4;                            {  kDETcmdPropertyCommand, kDETcmdSelfOpen  }
  1830.     kDETCallForViewChanges        = 8;                            {  kDETcmdViewListChanged, kDETcmdPropertyDirtied, kDETcmdMaximumTextLength  }
  1831.     kDETCallForDrops            = $10;                            {  kDETcmdDropQuery, kDETcmdDropMeQuery  }
  1832.     kDETCallForAttributes        = $20;                            {  kDETcmdAttributeCreation, kDETcmdAttributeNew, kDETcmdAttributeChange, kDETcmdAttributeDelete  }
  1833.     kDETCallForValidation        = $40;                            {  kDETcmdValidateSave  }
  1834.     kDETCallForKeyPresses        = $80;                            {  kDETcmdKeyPress and kDETcmdPaste  }
  1835.     kDETCallForResources        = $0100;                        {  kDETcmdDynamicResource  }
  1836.     kDETCallForSyncing            = $0200;                        {  kDETcmdShouldSync, kDETcmdDoSync  }
  1837.     kDETCallForEscalation        = $8000;                        {  All calls escalated from the next lower level  }
  1838.     kDETCallForNothing            = 0;                            {  None of the above  }
  1839.     kDETCallForEverything        = $FFFFFFFF;                    {  All of the above  }
  1840.  
  1841.  
  1842. TYPE
  1843. {$IFC TYPED_FUNCTION_POINTERS}
  1844.     DETCallProcPtr = FUNCTION(callBlockPtr: DETCallBlockPtr): OSErr;
  1845. {$ELSEC}
  1846.     DETCallProcPtr = ProcPtr;
  1847. {$ENDC}
  1848.  
  1849.     DETCallUPP = UniversalProcPtr;
  1850.  
  1851. CONST
  1852.     uppDETCallProcInfo = $000000E0;
  1853.  
  1854. FUNCTION NewDETCallProc(userRoutine: DETCallProcPtr): DETCallUPP;
  1855.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1856.     INLINE $2E9F;
  1857.     {$ENDC}
  1858.  
  1859. FUNCTION CallDETCallProc(callBlockPtr: DETCallBlockPtr; userRoutine: DETCallUPP): OSErr;
  1860.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1861.     INLINE $205F, $4E90;
  1862.     {$ENDC}
  1863.  
  1864. TYPE
  1865.     DETCall                                = DETCallUPP;
  1866. { This following macro saves you from having to dig out the call-back pointer from the call block: }
  1867. {**********************************************************************************}
  1868. {******************************** SAM Definitions: ********************************}
  1869. {**********************************************************************************}
  1870. { SAM Developers should use property numbers starting at this point: }
  1871.  
  1872. CONST
  1873.     kSAMFirstDevProperty        = 50;
  1874.  
  1875.  
  1876. {
  1877.     SAM templates have additional resources/properties that are required
  1878.     for interaction with the AOCE Key Chain.
  1879.     
  1880.      Type    Offset                        Description
  1881.      ----    ------                        -----------
  1882.     'rstr'    kSAMAspectUserName            The user name
  1883.     'rstr'    kSAMAspectKind                The kind of SAM
  1884.     'detn'    kSAMAspectCannotDelete        If 0, then the slot cannot be deleted
  1885.     'sami'    kSAMAspectSlotCreationInfo    The info required to create a slot record
  1886. }
  1887.     kSAMAspectUserName            = 41;
  1888.     kSAMAspectKind                = 42;
  1889.     kSAMAspectCannotDelete        = 43;
  1890.     kSAMAspectSlotCreationInfo    = 44;
  1891.  
  1892. {*************************************************************************************
  1893.  ********************************* Admin Definitions: *********************************
  1894.  *************************************************************************************}
  1895.     kDETAdminVersion            = -978;
  1896.  
  1897.  
  1898.  
  1899. {$ALIGN RESET}
  1900. {$POP}
  1901.  
  1902. {$SETC UsingIncludes := OCETemplatesIncludes}
  1903.  
  1904. {$ENDC} {__OCETEMPLATES__}
  1905.  
  1906. {$IFC NOT UsingIncludes}
  1907.  END.
  1908. {$ENDC}
  1909.